<#include "/common/common.ftl" encoding="UTF-8">
	<link href="${staticUrl}/css/form.css" type="text/css" rel="stylesheet" />
	<link href="${staticUrl}/js/validate/jquery.validate.css" type="text/css" rel="stylesheet" />
	<script src="${staticUrl}/js/validate/jquery.validate.js" type="text/javascript"></script>
	<script src="${staticUrl}/js/validate/messages_cn.js" type="text/javascript"></script>
	<#assign action="authority">
	<script>
		var treeUrl = "${request.contextPath}/security/dept!deptTree.action";
		$(document).ready(function(){
			//聚焦第一个输入框
			$("#loginName").focus();
			//为inputForm注册validate函数
			$("#inputForm").validate();
		});
	</script>
</head>
<body>
<div class="title"><#if id?exists>修改<#else>创建</#if>角色</div>
<div id="inputContent">
<form id="inputForm" action="${action}!save.action" method="post">
<input type="hidden" name="id" value="${(id)?if_exists}" />
<table class="content">
	<tr>
		<@ftlMacro.inputText name="displayName" descript="角色名" textShow="${displayName?if_exists}" cssStyle="required"/>
	</tr>
	<tr>
		<@ftlMacro.inputText name="name" descript="权限代码" textShow="${name?if_exists}"  cssStyle="required"/>
	</tr>
	<tr>
		<td class="textLabel">角色:</td>
		<td>
			<div style="word-break:break-all; " class="divShow">
				<@ftlMacro.checkboxDataSource name="checkedResourceIds" textValues=allResources checkedValues=checkedResourceIds/>
			</div>
		</td>
	</tr>
	<tr class="button">
		<td colspan="2">
			<input type="submit" value="提交" />&nbsp; 
			<input type="button" value="取消" onclick="history.back()"/>
		</td>
	</tr>
	<tr>
		<td colspan="2">
		</td>
	</tr>
</table>
</form>
</div>
</body>
</html>